import numpy as np
nums = [2, 0, 1, 1, 1, 0]
a = 0
b = 0
c = 0

for i in nums:
    if i == 0:
        a = a + 1
    elif i == 1:
        b = b + 1
    elif i == 2:
        c = c + 1
nums_two = []
while a>0:
    nums_two.append(0)
    a -= 1
while b>0:
    nums_two.append(1)
    b -= 1
while c>0:
    nums_two.append(2)
    c -= 1

print(nums_two)




